import { createPinia } from "pinia";
import { createPersistedState } from 'pinia-plugin-persistedstate'
const storeKeyPrefix = `${import.meta.env.VITE_STORAGE_PREFIX}_store_`
const pinia = createPinia();
pinia.use(createPersistedState({ key: id => `${storeKeyPrefix}${id}`, storage: localStorage }));

export { pinia };
